<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .parent{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        div::before{
            content: "";
            display: table;
        }
        .child{
            width: 100px;
            height: 100px;
            margin-top: 20px;
            background-color: yellow;
        }
        /* .clear{
            display: table;
        } */
    </style>
</head>
<body>
    <div class="parent">
        <!-- <div class="clear">

        </div> -->
       <div class="child">
         
       </div>
    </div>
</body>
</html>
